Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: don't import IL for partial compilation blocks #61572

Merged
merged 3 commits into from
Nov 17, 2021

Conversation

AndyAyersMS
Copy link
Member

Adjust partial comp not to import IL instead of importing it and then
deleting the IR. Saves some time and also sometimes a bit of stack
space as we won't create as many temps.

Update both PC and OSR to check for blocks in handlers early, rather
than pretending to support these and then backing out later.

Adjust partial comp not to import IL instead of importing it and then
deleting the IR. Saves some time and also sometimes a bit of stack
space as we won't create as many temps.

Update both PC and OSR to check for blocks in handlers early, rather
than pretending to support these and then backing out later.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Nov 14, 2021
@ghost
Copy link

ghost commented Nov 14, 2021

Tagging subscribers to this area: @JulieLeeMSFT
See info in area-owners.md if you want to be subscribed.

Issue Details

Adjust partial comp not to import IL instead of importing it and then
deleting the IR. Saves some time and also sometimes a bit of stack
space as we won't create as many temps.

Update both PC and OSR to check for blocks in handlers early, rather
than pretending to support these and then backing out later.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

cc @dotnet/jit-contrib

Improves "savings" from partial compilation at Tier0 by about 0.3% (pmi, fx). Total savings is around 4%.

Still thinking about ways to use partial comp more aggressively/effectively to reduce Tier0 jit time and code size. Static PGO seems appealing as a guiding criteria, but we only have static PGO for methods that have R2R instances and those won't go through Tier0 (and if R2R is disabled the PGO bundles aren't considered either). So may need to look elsewhere.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-jit-experimental

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Looks like all the partial comp tests with localloc are failing -- likely I'm missing a safety check.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-jit-experimental

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Localloc issues are handled now, but still seeing problems with some generic EH tests.

@AndyAyersMS
Copy link
Member Author

/azp run runtime-jit-experimental

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AndyAyersMS
Copy link
Member Author

Experimental CI failures back down to the expected set.

@dotnet/jit-contrib PTAL.

@AndyAyersMS
Copy link
Member Author

@dotnet/jit-contrib Anybody up for a review here? It should be quick.

I have other changes that build on this one....

block->bbFlags |= BBF_PARTIAL_COMPILATION_PATCHPOINT;
setMethodHasPartialCompilationPatchpoint();

// Change block to BBJ_THROW so we won't trigger importation of sucessors.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo:

Suggested change
// Change block to BBJ_THROW so we won't trigger importation of sucessors.
// Change block to BBJ_THROW so we won't trigger importation of successors.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will fix in my next PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants